/**
 * 1.Mar.09
 */
package com.wy.tool;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 * @author Diegel
 * 
 */
public class JDBConnection {
	private String dbDriver = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
	private String url = "jdbc:microsoft:sqlserver://localhost:1433;User=sa;Password=;DatebaseName=db_shopping";
	public Connection connection = null;

	public JDBConnection() {
		try {
			Class.forName(dbDriver).newInstance(); // Load database driver
			connection = DriverManager.getConnection(url); // Load
			// database
			// connection.setAutoCommit(true);
		} catch (Exception e) {
			System.out.println("Error to load database!");
		}
	}

}
